package com.hsit.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hsit.dao.DogDao;
import com.hsit.dao.PageObj;

@Service
public class DogService {

	@Autowired
	private DogDao dogDao;
	
	public void register(String username,String password,String email){
		dogDao.register(username, password, email);
	}
	
	
	public Object logincheck(String username,String password){
		return dogDao.logincheck(username, password);
	}
	
	
	public Object checktwice(String username){
		return dogDao.checktwice(username);
	}
	
	public void dogregister(int dtype,String dname,String dage,String dprice,String ds,String dimg,String dstatus){
		dogDao.dogregister(dtype, dname, dage, dprice, ds, dimg, dstatus);
		
	}
	
	public Object imgcheck(String dimg){
		return dogDao.imgcheck(dimg);
	}
	
	public PageObj selectDog(int id,String dname,int dtypeid){
		return  dogDao.selectDog(id, dname, dtypeid);
	}
	public Object typeId(String dtypename){
		
		return dogDao.typeId(dtypename);
	}
	public List selectTyname(){
		return dogDao.selectTyname();
	}
	  public void Cariadd(int id,int did){
             dogDao.Cariadd(id, did);		  
	  }
	  public Object selectId(String username){
		  return dogDao.selectId(username);
	  }
	  public Object Caricheck(int id,int did){
		  return dogDao.Caricheck(id, did);
	  }
	  public List SelectCari(int id){
		  return dogDao.SelectCari(id);
	  }
	  public void deleteCari(String ids){
		  dogDao.deleteCari(ids);
	  }
	  public List seletDname(String ids){
		  return dogDao.seletDname(ids);
	  }
	  public int YorderAdd(String yaddress,String yprice,String ystatus,int id){
		return  dogDao.YorderAdd(yaddress, yprice, ystatus, id);
	  }
	  public void DetailAdd(int yid,int did,int count){
		  dogDao.DetailAdd(yid, did, count);
	  }
	  public List SelectStatus1(String ystatus,int id){
		  return dogDao.SelectStatus1(ystatus,id);
		  
	  }
	  public List SelectStatus1Dname(int yid){
		  return dogDao.SelectStatus1Dname(yid);
	  }
	  public List SelectStatus1Count(int yid){
		  return dogDao.SelectStatus1Count(yid);
	  }
	  public List  SelectYorder(int id,String ystatus){
		  return dogDao.SelectYorder(id,ystatus);
		  
	  }
	  public void DeleteYorder(String yids){
		  dogDao.DeleteYorder(yids);
	  }
	  public void DeleteDetail(String yids){
		  dogDao.DeleteDetail(yids);
	  }
	  public void ChangeStatus(String yaddress,String yids){
		  dogDao.ChangeStatus(yaddress, yids);
	  }
	  public void ChangeDstatus(String dstatus,int did){
		  dogDao.ChangeDstatus(dstatus, did);
	  }
	  public void delete1(int did){
		  dogDao.delete1(did);
	  }
	  public List selectDetailYid(int did){
		return  dogDao.selectDetailYid(did);
	  }
	  public Object selectYorderYstatus(int yid){
		  return dogDao.selectYorderYstatus(yid);
	  }
	  public void deleteYorderAll(int yid){
		  dogDao.deleteYorderAll(yid);
	  }
	  public void deleteDetailAll(int yid){
		  dogDao.deleteDetailAll(yid);
	  }
	  public Object select2(int yid){
		  return dogDao.select2(yid);
	  }
}
